﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        .draggable { width: 100px; height: 40px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        .droppable, .droppable2 { width: 230px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
        .droppable-inner, .droppable2-inner { width: 170px; height: 60px; padding: 0.5em; float: left; margin: 10px; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:Panel ID="Panel1" runat="server" CssClass="ui-widget-content draggable">
        <p>
            Drag me to my target</p>
    </asp:Panel>
    <asp:Panel ID="OuterPanel" runat="server" CssClass="ui-widget-header droppable">
        <p>
            Outer droppable</p>
        <asp:Panel ID="InnerPanel" runat="server" CssClass="ui-widget-header droppable-inner">
            <p>
                Inner droppable (not greedy)</p>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="OuterPanel1" runat="server" CssClass="ui-widget-header droppable2">
        <p>
            Outer droppable</p>
        <asp:Panel ID="InnerPanel1" runat="server" CssClass="ui-widget-header droppable2-inner">
            <p>
                Inner droppable (greedy)</p>
        </asp:Panel>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable2" runat="server">
        <Target TargetID="Panel1" />
    </DotNetAge:Draggable>
    <DotNetAge:Droppable ID="DroppableOI" runat="server" ActiveCssClass="ui-state-hover"
        HoverCssClass="ui-state-active" OnClientDrop="$(this).addClass('ui-state-highlight').find('> p').html('Dropped!');return false;">
        <Target TargetIDs="OuterPanel,InnerPanel" />
    </DotNetAge:Droppable>
    <DotNetAge:Droppable ID="Droppable1" runat="server" ActiveCssClass="ui-state-hover"
        Greedy="true" HoverCssClass="ui-state-active" OnClientDrop="$(this).addClass('ui-state-highlight').find('> p').html('Dropped!');">
        <Target TargetIDs="OuterPanel1,InnerPanel1" />
    </DotNetAge:Droppable>
    </form>
</body>
</html>
